﻿using System.Collections.Generic;
using System.Linq;

namespace DataLayer
{
    public partial class ProductStaticRepository
    {
        public static IList<Product> GetByCategory(int id)
        {
            IQueryable<Product> res = SelectAll().Where(p => p.CategoryID == id);
            return res.ToList();
        }

        public static void InsertBlank()
        {
            Product p = new Product { CategoryID = 1, ProductName = "test", SupplierID = 1 };
            Insert(p);
        }
    }
}